mean Interface

public interface mean

Computes the mean of a set of data.


Module Procedures

private pure function mean_array(x) result(rst)

Computes the mean using a scaled, compensated sum.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(:)

The array of values to analyze.

Return Value real(kind=real64)

Mean; empty arrays or nonfinite observations give NaN.

private pure function mean_column(x) result(rst)

Computes a column mean using a scaled, compensated sum without copying data.

Arguments

Type IntentOptional Attributes Name
class(data_column), intent(in) :: x

The input column; unallocated storage is treated as empty.

Return Value real(kind=real64)

Mean; empty arrays or nonfinite observations give NaN.